<?php
/*************************************************************************************
 *
 *	FileName: CacheConfig.php
 *	Desc    : This configuration file includes all the definitions for the cache system
 *	Author  : Seal
 *	Date    : 2010-5-28
 *
 *************************************************************************************/

	/**********************************************************
	 *
	 * This design is to support the distributed cache instance
	 * and deal with more than one MemCached instance.
	 *
	 **********************************************************/
	$cacheCluster = array(
		
		'DEFAULT' => array(
			'HOST' => '127.0.0.1',
			'PORT' => 11211,
			'STATUS' => 'DEAD',
			'OBJECT' => NULL
		)
	
	);
	
	
	/**********************************************************
	 *	CNS stands for Cache Namespace.
	 * 	Under every cache namespace, the items have the same
	 *  expire time and other cache policy if required. 
	 **********************************************************/

	$CNS_INDEX = array(
		'CLUSTER' => 'DEFAULT',
		// 3 hours for the index page content cache
		'EXPIRE' => 3 * 60 * 60		
	);
	
	$CNS_PRODUCT_SHOP_VARIABLE = array(
		'CLUSTER' => 'DEFAULT',
		// 1 hours for the items of product or shop items
		'EXPIRE' => 1 * 60 * 60		
	);
	
	$CNS_TOP_DETAIL = array(
		'CLUSTER' => 'DEFAULT',
		// 3 hours for the items of product or shop items
		'EXPIRE' => 5 * 60 * 60		
	);
	
	$CNS_SLOW_CHANGE = array(
		'CLUSTER' => 'DEFAULT',
		// 12 hours for the items of nearly static date
		'EXPIRE' => 12 * 60 * 60		
	);
	
	$CNS_EVENT_ACTIVITIES = array(
		'CLUSTER' => 'DEFAULT',
		// 
		'EXPIRE' => 1 * 60 * 60		
	);
	
	$CNS_COUPON_GIFT = array(
		'CLUSTER' => 'DEFAULT',
		// 
		'EXPIRE' => 0.2 * 60 * 60		
	);
	
	$CNS_LIST = array(
		'CLUSTER' => 'DEFAULT',
		// 
		'EXPIRE' => 1 * 60 * 60		
	);
	
	$CNS_REVIEW = array(
		'CLUSTER' => 'DEFAULT',
		// 
		'EXPIRE' => 0.5 * 60 * 60		
	);
	
	$CNS_SENS_WORD = array(
		'CLUSTER' => 'DEFAULT',
		'EXPIRE' => 12 * 60 * 60		
	);

	
	define( 'CNS_INDEX', 'CNS_INDEX' );
	define( 'CNS_PRODUCT_SHOP_VARIABLE', 'CNS_PRODUCT_SHOP_VARIABLE' );
	define( 'CNS_SLOW_CHANGE', 'CNS_SLOW_CHANGE' );
	define( 'CNS_TOP_DETAIL', 'CNS_TOP_DETAIL' );
	define( 'CNS_EVENT_ACTIVITIES', 'CNS_EVENT_ACTIVITIES' );
	define( 'CNS_SENS_WORD', 'CNS_SENS_WORD' );
	define( 'CNS_COUPON_GIFT', 'CNS_COUPON_GIFT');
	define( 'CNS_LIST', 'CNS_LIST');
	define(	'CNS_REVIEW', 'CNS_REVIEW');
	
?>